#ifndef MCONFIG_H
#define MCONFIG_H


#define BOOTLOADER      1

#define HW_Vision       1.0f
#define SW_Vision       1.2f

/*
#define Extflash_Init_Flag      0x23    // flag = 0x23  在出厂时必须为此值
*/

#define Extflash_Init_Flag      0x23

enum PROJECT
{
  TEST_PROJECT = 1,
  XY_PROJECT,
  ATMT_ONE_CULUMN_PROJECT,              //abs encoder
  ATMT_TWO_CULUMN_PROJECT               //inc encoder

} ;
//// 1: rk_ns0340 2:test
#define CHOICE_PROJECT             XY_PROJECT

#define okey            1
#define disable         0


typedef struct
{
  uint8_t INA226;
  uint8_t W25QXX;
  uint8_t HUART1;
  uint8_t HUART2;
  uint8_t HUART3;
  uint8_t HUART4;
  uint8_t HUART5;
  uint8_t HUART6;
  uint8_t TIMER10;
  uint8_t DS18B20;
  uint8_t ENCODER;
  uint8_t WATER_LEVEL;
  uint8_t FLOWMETER;
  uint8_t EC20;
  uint8_t FAN;
  uint8_t LED;
  uint8_t SCREEN;
  uint8_t MOTOR_DIV;
  uint8_t DEBUGCOM;

}__attribute__((packed, aligned(1))) MCONFIG;

extern void (*proc)( void );

void proc_prepare( void );

void select_proc( void );
void motor_study( void );
void device_login( void );
void config_effect(void );
void bsp_init( void );
void mainproc_prepare( void );
void calibration_system_parameter( void );
#endif